<?php
/**
 * @copyright	Copyright (C) 2008 - 2011 ZooTemplate.com. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
	<jdoc:include type="head" />
	<?php JHTML::_('behavior.mootools'); ?>

	<?php if($ztTools->getParam('zt_fontfeature')) : ?>
	<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css' />
	<?php endif; ?>

	<?php
		$document = JFactory::getDocument();
		$document->addStyleSheet($ztTools->baseurl() . 'templates/system/css/system.css');
		$document->addStyleSheet($ztTools->baseurl() . 'templates/system/css/general.css');
		$document->addStyleSheet($ztTools->templateurl() . 'css/default.css');
		$document->addStyleSheet($ztTools->templateurl() . 'css/template.css');
		
		if($ztrtl == 'rtl') {
			$document->addStyleSheet($ztTools->templateurl() . 'css/template_rtl.css');
			$document->addStyleSheet($ztTools->templateurl() . 'css/typo_rtl.css');
		} else {
			$document->addStyleSheet($ztTools->templateurl() . 'css/typo.css');
		}
		
		if($ztTools->getParam('zt_fontfeature')) {
			$document->addStyleSheet($ztTools->templateurl() . 'css/fonts.css');
		}
		
		if($this->params->get('zt_change_color')) {
			$document->addStyleSheet($ztTools->templateurl() . 'css/rainbow.css');
			$document->addStyleSheet($ztTools->templateurl() . 'css/patterns.css');
			$document->addScript($ztTools->templateurl() . 'js/zt.script.js');
			$document->addScript($ztTools->templateurl() . 'js/rainbow.js');
			$document->addScript($ztTools->templateurl() . 'js/ladypop.js');
		}
	?>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/modules.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/css3.php?url=<?php echo $ztTools->templateurl(); ?>" type="text/css" />
	<script type="text/javascript">
		var baseurl = "<?php echo $ztTools->baseurl() ; ?>";
		var ztpathcolor = '<?php echo $ztTools->templateurl(); ?>css/colors/';
		var tmplurl = '<?php echo $ztTools->templateurl();?>';
		var CurrentFontSize = parseInt('<?php echo $ztTools->getParam('zt_font');?>');
	</script>
	<!--[if lte IE 6]>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/ie6.css" type="text/css" />
	<script type="text/javascript" src="<?php echo $ztTools->templateurl() ?>js/ie_png.js"></script>
	<script type="text/javascript">
	window.addEvent ('load', function() {
	   ie_png.fix('.png');
	});
	</script>
	<![endif]-->
	<!--[if lte IE 7]>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/ie7.css" type="text/css" />
	<![endif]-->

<?php
	if($this->params->get('zt_change_color')) {
		include_once (dirname(__FILE__).DS.'header.php');
	}
?>

</head>
<body id="bd" class="fs<?php echo $ztTools->getParam('zt_font'); ?> <?php echo $ztTools->getParam('zt_display'); ?> <?php echo $ztTools->getParam('zt_display_style'); ?> <?php echo $ztrtl; ?>">
<div id="zt-wrapper">
	<div id="zt-wrapper-inner" class="clearfix <?php echo $ztTools->getParamsValue($prefix.'zt-wrapper-inner_class');?>">

		<?php if($this->countModules('topmenu') || $this->countModules('highlight')) : ?>
		<div id="zt-userwrap1" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-userwrap1-inner">
					<?php if($this->countModules('topmenu')) : ?>
					<div id="zt-topmenu">
						<jdoc:include type="modules" name="topmenu" />
					</div>
					<?php endif; ?>
					<?php if($this->countModules('highlight')) : ?>
					<div id="zt-highlight">
						<jdoc:include type="modules" name="highlight" />
					</div>
					<?php endif; ?>
				</div>
			</div>
		</div>
		<?php endif; ?>

		<div id="zt-frame" class="clearfix">

			<!-- HEADER -->
			<div id="zt-header" class="clearfix">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-header-inner">
							
							<div id="zt-logo">
								<h1 id="logo"><a class="png" href="<?php echo $ztTools->baseurl() ; ?>" title="<?php echo $ztTools->sitename() ; ?>">
									<span><?php echo $ztTools->sitename() ; ?></span></a>
								</h1>
							</div>
							<div id="zt-mainmenu">
								<div id="zt-mainmenu-inner">
									<?php $menu->show(); ?>
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
			<!-- END HEADER -->

			<?php if($this->countModules('search')) : ?>
			<div id="zt-search" class="clearfix">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-search-inner">
							<jdoc:include type="modules" name="search" />
						</div>
					</div>
				</div>
			</div>
			<?php endif; ?>

			<?php if($this->countModules('slideshow')) : ?>
			<div id="zt-slideshow" class="clearfix">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-slideshow-inner">
							<jdoc:include type="modules" name="slideshow" />
						</div>
					</div>
				</div>
			</div>
			<?php endif; ?>

			<?php if($this->countModules('top')) : ?>
			<div id="zt-top" class="clearfix">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-top-inner">
							<jdoc:include type="modules" name="top" style="ztxhtml" />
						</div>
					</div>
				</div>
			</div>
			<?php endif; ?>

			<?php
			$spotlight = array ('user1','user2','user3','user4');
			$consl = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100,'%');
			if( $consl) :
			?>	
			<div id="zt-userwrap2" class="clearfix">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-userwrap2-inner">
						
							<?php if($this->countModules('user1')) : ?>
							<div id="zt-user1" class="zt-user zt-box<?php echo $consl['user1']['class']; ?>" style="width: <?php echo $consl['user1']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user1" style="ztxhtml" />
								</div>
							</div>
							<?php endif; ?>
							
							<?php if($this->countModules('user2')) : ?>
							<div id="zt-user2" class="zt-user zt-box<?php echo $consl['user2']['class']; ?>" style="width: <?php echo $consl['user2']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user2" style="ztxhtml" />
								</div>
							</div>
							<?php endif; ?>
							
							<?php if($this->countModules('user3')) : ?>
							<div id="zt-user3" class="zt-user zt-box<?php echo $consl['user3']['class']; ?>" style="width: <?php echo $consl['user3']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user3" style="ztxhtml" />
								</div>
							</div>
							<?php endif; ?>
							
							<?php if($this->countModules('user4')) : ?>
							<div id="zt-user4" class="zt-user zt-box<?php echo $consl['user4']['class']; ?>" style="width: <?php echo $consl['user4']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user4" style="ztxhtml" />
								</div>
							</div>
							<?php endif; ?>

						</div>
					</div>
				</div>
			</div>
			<?php endif; ?>



			<!-- MAINBODY -->
			<div id="zt-mainbody" class="clearfix <?php echo $ztTools->getPageClassSuffix(); ?>">
				<div class="zt-wrapper">
					<div class="zt-wrapper-inner">
						<div id="zt-mainbody-inner">
						
							<!-- CONTAINER -->
							<div id="zt-container<?php echo $zt_width; ?>" class="clearfix">
									
								<div id="zt-middle">
									<div id="zt-middle-inner" class="clearfix">

										<?php if($this->countModules('left')) : ?>
										<div id="zt-left">
											<div id="zt-left-inner">
												<jdoc:include type="modules" name="left" style="ztxhtml" />
											</div>
										</div>
										<?php endif; ?>

										<div id="zt-content">
											<div id="zt-content-inner">

												<?php if($this->countModules('breadcrumb')) : ?>
												<div id="zt-breadcrumb">
													<span><strong><?php echo JText::_('YOU ARE HERE')?></strong></span> <jdoc:include type="modules" name="breadcrumb" />
												</div>
												<?php endif; ?>

												<?php if($this->countModules('user5')) : ?>
												<div id="zt-user5" class="clearfix">
													<jdoc:include type="modules" name="user5" style="ztxhtml" />
												</div>
												<?php endif; ?>
													
												<div id="zt-component" class="clearfix">
													<jdoc:include type="message" />
													<jdoc:include type="component" />
												</div>

											   <?php if($this->countModules('user6')) : ?>
											   <div id="zt-user6" class="clearfix">
													<jdoc:include type="modules" name="user6" style="ztxhtml" />
											   </div>
												<?php endif; ?>
												
												<?php
												$spotlight = array ('col1','col2','col3');
												$botsl1 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100,'%');
												if( $botsl1 ) :
												?>
												<div id="zt-col" class="clearfix">
														
													<?php if($this->countModules('col1')) : ?>
														<div id="zt-col1" class="zt-user zt-box<?php echo $botsl1['col1']['class']; ?>" style="width: <?php echo $botsl1['col1']['width']; ?>;">
															<div class="zt-box-inside">
																<jdoc:include type="modules" name="col1" style="ztxhtml" />
															</div>
														</div>
													<?php endif; ?>
													
													<?php if($this->countModules('col2')) : ?>
														<div id="zt-col2" class="zt-user zt-box<?php echo $botsl1['col2']['class']; ?>" style="width: <?php echo $botsl1['col2']['width']; ?>;">
															<div class="zt-box-inside">
																<jdoc:include type="modules" name="col2" style="ztxhtml" />
															</div>
														</div>
													<?php endif; ?>
													
													<?php if($this->countModules('col3')) : ?>
														<div id="zt-col3" class="zt-user zt-box<?php echo $botsl1['col3']['class']; ?>" style="width: <?php echo $botsl1['col3']['width']; ?>;">
															<div class="zt-box-inside">
																<jdoc:include type="modules" name="col3" style="ztxhtml" />
															</div>
														</div>
													<?php endif; ?>
													
												</div>		
												<?php endif; ?>
												
											</div>
										</div>

									</div>
								</div>
								
								<?php if($this->countModules('right') || $this->countModules('col4') || $this->countModules('col5')) : ?>
								<div id="zt-rightmiddle">
									<div id="zt-rightmiddle-inner">

										<?php
										$spotlight = array ('col4','col5');
										$botsl1 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100,'%');
										if( $botsl1 ) :
										?>
										<div id="zt-col-right" class="clearfix">
												
											<?php if($this->countModules('col4')) : ?>
												<div id="zt-col4" class="zt-user zt-box<?php echo $botsl1['col4']['class']; ?>" style="width: <?php echo $botsl1['col4']['width']; ?>;">
													<div class="zt-box-inside">
														<jdoc:include type="modules" name="col4" style="ztxhtml" />
													</div>
												</div>
											<?php endif; ?>
											
											<?php if($this->countModules('col5')) : ?>
												<div id="zt-col5" class="zt-user zt-box<?php echo $botsl1['col5']['class']; ?>" style="width: <?php echo $botsl1['col5']['width']; ?>;">
													<div class="zt-box-inside">
														<jdoc:include type="modules" name="col5" style="ztxhtml" />
													</div>
												</div>
											<?php endif; ?>
											
										</div>		
										<?php endif; ?>
										
										<?php if($this->countModules('right')) : ?>
										<div id="zt-right" class="clearfix">
											<div id="zt-right-inner">
												<jdoc:include type="modules" name="right" style="ztxhtml" />
											</div>
										</div>
										<?php endif; ?>

									</div>
								</div>
								<?php endif; ?>

							</div>
							<!-- END CONTAINER -->
		
							<?php
							$spotlight = array ('user7','user8','user9','user10');
							$botsl2 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100, '%');
							if( $botsl2 ) :
							?>	
							<div id="zt-userwrap3" class="clearfix">
								<div id="zt-userwrap3-inner">
									<?php if($this->countModules('user7')): ?>
										<div id="zt-user7" class="zt-user zt-box<?php echo $botsl2['user7']['class']; ?>" style="width:<?php echo $botsl2['user7']['width']; ?>;">
											<div class="zt-box-inside">
												<jdoc:include type="modules" name="user7" style="ztxhtml" />
											</div>
										</div>
									<?php endif; ?>
										
									<?php if($this->countModules('user8')) : ?>
										<div id="zt-user8" class="zt-user zt-box<?php echo $botsl2['user8']['class']; ?>" style="width:<?php echo $botsl2['user8']['width']; ?>;">
											<div class="zt-box-inside">
												<jdoc:include type="modules" name="user8" style="ztxhtml" />
											</div>
										</div>
									<?php endif; ?>
										
									<?php if($this->countModules('user9')) : ?>
										<div id="zt-user9" class="zt-user zt-box<?php echo $botsl2['user9']['class']; ?>" style="width:<?php echo $botsl2['user9']['width']; ?>;">
											<div class="zt-box-inside">
												<jdoc:include type="modules" name="user9" style="ztxhtml" />
											</div>
										</div>
									<?php endif; ?>
										
									<?php if($this->countModules('user10')) : ?>
										<div id="zt-user10" class="zt-user zt-box<?php echo $botsl2['user10']['class']; ?>" style="width:<?php echo $botsl2['user10']['width']; ?>;">
											<div class="zt-box-inside">
												<jdoc:include type="modules" name="user10" style="ztxhtml" />
											</div>
										</div>
									<?php endif; ?>
								</div>
							</div>
							<?php endif; ?>

						</div>
					</div>
				</div>		
			</div>
			<!-- END MAINBODY -->

		</div>

		<?php if($this->countModules('inset')): ?>
		<div id="zt-inset" class="clearfix">
			<div class="zt-wrapper">
				<div class="zt-wrapper-inner">
					<div id="zt-inset-inner">
						<jdoc:include type="modules" name="inset" style="ztxhtml" />
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>

		<?php
		$spotlight = array ('user11','user12','user13','user14');
		$botsl3 = $ztTools->calSpotlight ($spotlight,$ztTools->isOP()?99:100,'%');
		if( $botsl3 ) :
		?>

		<div id="zt-userwrap4" class="clearfix">
			<div class="zt-wrapper">
				<div class="zt-wrapper-inner">
					<div id="zt-userwrap4-inner">
						<?php if($this->countModules('user11')) : ?>
							<div id="zt-user11" class="zt-user zt-box<?php echo $botsl3['user11']['class']; ?>" style="width: <?php echo $botsl3['user11']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user11" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>

						<?php if($this->countModules('user12')) : ?>
							<div id="zt-user12" class="zt-user zt-box<?php echo $botsl3['user12']['class']; ?>" style="width: <?php echo $botsl3['user12']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user12" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>

						<?php if($this->countModules('user13')) : ?>
							<div id="zt-user13" class="zt-user zt-box<?php echo $botsl3['user13']['class']; ?>" style="width: <?php echo $botsl3['user13']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user13" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>

						<?php if($this->countModules('user14')) : ?>
							<div id="zt-user14" class="zt-user zt-box<?php echo $botsl3['user14']['class']; ?>" style="width: <?php echo $botsl3['user14']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user14" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>
		

		<?php
		$spotlight = array ('user15','user16','user17','user18');
		$botsl2 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100, '%');
		if( $botsl2 ) :
		?>
		<div id="zt-userwrap5" class="clearfix">
			<div class="zt-wrapper">
				<div class="zt-wrapper-inner">
					<div id="zt-userwrap5-inner">
						<?php if($this->countModules('user15')) : ?>
							<div id="zt-user15" class="zt-user zt-box<?php echo $botsl2['user15']['class']; ?>" style="width:<?php echo $botsl2['user15']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user15" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>

						<?php if($this->countModules('user16')): ?>
							<div id="zt-user16" class="zt-user zt-box<?php echo $botsl2['user16']['class']; ?> " style="width:<?php echo $botsl2['user16']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user16" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>
							
						<?php if($this->countModules('user17')) : ?>
							<div id="zt-user17" class="zt-user zt-box<?php echo $botsl2['user17']['class']; ?>" style="width:<?php echo $botsl2['user17']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user17" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>
							
						<?php if($this->countModules('user18')) : ?>
							<div id="zt-user18" class="zt-user zt-box<?php echo $botsl2['user18']['class']; ?>" style="width:<?php echo $botsl2['user18']['width']; ?>;">
								<div class="zt-box-inside">
									<jdoc:include type="modules" name="user18" style="ztxhtml" />
								</div>
							</div>
						<?php endif; ?>
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>

		<div id="zt-bottom" class="clearfix">
			<div class="zt-wrapper">
				<div class="zt-wrapper-inner">
					<div id="zt-bottom-inner">

						<div id="zt-copyright" class="clearfix">
							<div id="zt-copyright-inner">
								<?php if($ztTools->getParam('zt_footer')) : ?>
								<?php echo $ztTools->getParam('zt_footer_text'); ?>
								<?php else : ?>
								Copyright &copy; 2008 - <?php echo date('Y'); ?> <a href="http://www.zootemplate.com" title="Joomla Templates">Joomla Templates</a>  by <a href="http://www.zootemplate.com" title="ZooTemplate">ZooTemplate.Com</a>. All rights reserved.
								<?php endif; ?>
							</div>
						</div>

						<?php if($this->countModules('footer')) : ?>
						<div id="zt-footer">
							<div id="zt-footer-inner"><jdoc:include type="modules" name="footer" /></div>
						</div>
						<?php endif; ?>

					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jdoc:include type="modules" name="debug" />

<?php
	if($this->params->get('zt_change_color')) {
		include_once (dirname(__FILE__).DS.'footer.php');
	}
?>

</body>
</html>